package com.seaboxdata.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.seaboxdata.entity.DataShareInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DataShareInfoDao extends BaseMapper<DataShareInfo> {

    List<DataShareInfo> getDataShareDbInfo();

    String getDataSharedSize();

    @DS("subject")
    String getSpaceSizeByTable(@Param("tableName") String tableName);

    /**
     * 获取实时总数据量
     */
    List<DataShareInfo> getActualTimeDataInfo();

    @DS("queuing")
    Integer getTableSizeByTable(@Param("tableName") String tableName);


    /**
     * 获取数据汇聚表空间
     *
     * @return
     */
    String getMppDbSpaceDataInfo();

}
